-- GENERATED SPELL FOR [Sandfury Cretin] --


function spell0_7789(pUnit, Event) --@Demon Skin,Self--
pUnit:FullCastSpellOnTarget(20798,pUnit)
pUnit:RegisterEvent('Sorts_7789', 0, 1)
end

function spell1_7789(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(14032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7789', 18000, 1)
end

function Sorts_7789(pUnit, Event)
local choix_sorts_7789 = math.random(0, 1)
if choix_sorts_7789 == 0 then
pUnit:RegisterEvent('spell0_7789', 1, 1)
end
if choix_sorts_7789 == 1 then
pUnit:RegisterEvent('spell1_7789', 1, 1)
end
end

function mob7789_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7789', math.random(1500, 3000), 1)
end

function mob7789_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7789_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7789_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7789, 1, 'mob7789_Action')
RegisterUnitEvent(7789, 2, 'mob7789_Leave')
RegisterUnitEvent(7789, 3, 'mob7789_Kill')
RegisterUnitEvent(7789, 4, 'mob7789_Die')
